home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / bookform / bf10.sty < prev    next >
Text File  |  1993-01-11  |  17KB  |  367 lines

  1. % BOOKFORM DOCUMENT STYLE -- for LaTeX version 2.08
  2.  
  3. %  ****************************************
  4. %  *               FONTS                  *
  5. %  ****************************************
  6. %
  7.  
  8. \lineskip 1pt            % \lineskip is 1pt for all font sizes.
  9. \normallineskip 1pt
  10. \def\baselinestretch{1}
  11.  
  12. % Each size-changing command \SIZE executes the command
  13. %        \@setsize\SIZE{BASELINESKIP}\FONTSIZE\@FONTSIZE
  14. % where:
  15. %   BASELINESKIP = Normal value of \baselineskip for that size.  (Actual
  16. %                  value will be \baselinestretch * BASELINESKIP.)
  17. %
  18. %  \FONTSIZE     = Name of font-size command.  The currently available
  19. %                  (preloaded) font sizes are: \vpt (5pt), \vipt (6pt),
  20. %                  \viipt (etc.), \viiipt, \ixpt, \xpt, \xipt, \xiipt,
  21. %                  \xivpt, \xviipt, \xxpt, \xxvpt.
  22. %  \@FONTSIZE    = The same as the font-size command except with an
  23. %                  '@' in front---e.g., if \FONTSIZE = \xivpt then
  24. %                  \@FONTSIZE = \@xivpt.
  25. %
  26. % For reasons of efficiency that needn't concern the designer,
  27. % the document style defines \@normalsize instead of \normalsize .  This is
  28. % done only for \normalsize, not for any other size-changing commands.
  29.  
  30. \def\@normalsize{\@setsize\normalsize{12pt}\xpt\@xpt
  31. \abovedisplayskip 10pt plus2pt minus5pt%
  32. \belowdisplayskip \abovedisplayskip
  33. \abovedisplayshortskip  \z@ plus3pt%
  34. \belowdisplayshortskip  6pt plus3pt minus3pt}
  35.  
  36. \def\small{\@setsize\small{11pt}\ixpt\@ixpt
  37. \abovedisplayskip 8.5pt plus 3pt minus 4pt%
  38. \belowdisplayskip \abovedisplayskip
  39. \abovedisplayshortskip \z@ plus2pt%
  40. \belowdisplayshortskip 4pt plus2pt minus 2pt
  41. \def\@listi{\topsep 4pt plus 2pt minus 2pt\parsep 2pt plus 1pt minus 1pt
  42. \itemsep \parsep}}
  43.  
  44. \def\footnotesize{\@setsize\footnotesize{9.5pt}\viiipt\@viiipt
  45. \abovedisplayskip 6pt plus 2pt minus 4pt%
  46. \belowdisplayskip \abovedisplayskip
  47. \abovedisplayshortskip \z@ plus 1pt%
  48. \belowdisplayshortskip 3pt plus 1pt minus 2pt
  49. \def\@listi{\topsep 3pt plus 1pt minus 1pt\parsep 2pt plus 1pt minus 1pt
  50. \itemsep \parsep}}
  51.  
  52. \def\scriptsize{\@setsize\scriptsize{8pt}\viipt\@viipt}
  53. \def\tiny{\@setsize\tiny{6pt}\vpt\@vpt}
  54. \def\large{\@setsize\large{14pt}\xiipt\@xiipt}
  55. \def\Large{\@setsize\Large{18pt}\xivpt\@xivpt}
  56. \def\LARGE{\@setsize\LARGE{22pt}\xviipt\@xviipt}
  57. \def\huge{\@setsize\huge{25pt}\xxpt\@xxpt}
  58. \def\Huge{\@setsize\Huge{30pt}\xxvpt\@xxvpt}
  59.  
  60. \normalsize  % Choose the normalsize font.
  61.  
  62.  
  63. %  ****************************************
  64. %  *            PAGE LAYOUT               *
  65. %  ****************************************
  66. %
  67. % All margin dimensions measured from a point one inch from top and side
  68. % of page.  Dimensions shrink by about 2 percent
  69.  
  70. % SIDE MARGINS:
  71. \if@twoside                 % Values for two-sided printing:
  72.    \oddsidemargin  44pt     %   Left margin on odd-numbered pages.
  73.    \evensidemargin 82pt     %   Left margin on even-numbered pages.
  74.    \marginparwidth 107pt    %   Width of marginal notes.
  75. \else                       % Values for one-sided printing:
  76.    \oddsidemargin  0pt     %   Note that \oddsidemargin = \evensidemargin
  77.    \evensidemargin 0pt
  78.    \marginparwidth 90pt
  79. \fi
  80. \marginparsep 11pt          % Horizontal space between outer margin and
  81.                             % marginal note
  82.  
  83.  
  84. % VERTICAL SPACING:
  85.                          % Top of page:
  86. \topmargin -35pt         %    Nominal distance from top of page to top of
  87.                          %    box containing running head.
  88. \headheight 24pt         %    Height of box containing running head.
  89. \headsep 25pt            %    Space between running head and text.
  90. % \topskip = 10pt        %    '\baselineskip' for first line of page.
  91.                          % Bottom of page:
  92. \footheight 12pt         %    Height of box containing running foot.
  93. \footskip 75pt           %    Distance from baseline of box containing foot
  94.                          %    to baseline of last line of text.
  95.  
  96.  
  97. % DIMENSION OF TEXT:
  98.  
  99. \textheight 8.33in       % Height of text (including footnotes and figures,
  100.                          % excluding running head and foot).
  101. \textwidth 6.25in        % Width of text line.
  102.                          % For two-column mode:
  103. \columnsep 10pt          %    Space between columns
  104. \columnseprule 0pt       %    Width of rule between columns.
  105.  
  106. % A \raggedbottom command causes 'ragged bottom' pages: pages set to
  107. % natural height instead of being stretched to exactly \textheight.
  108.  
  109. % FOOTNOTES:
  110.  
  111. \footnotesep 12pt    % Height of strut placed at the beginning of every
  112.                      % footnote.
  113. \skip\footins 6pt plus 2pt minus 2pt  % Space between last line of text and
  114.                                       % top of first footnote.
  115.  
  116. % FLOATS: (a float is something like a figure or table)
  117. %
  118. %  FOR FLOATS ON A TEXT PAGE:
  119. %
  120. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  121. \floatsep 12pt plus 2pt minus 2pt        % Space between adjacent floats moved
  122.                                          % to top or bottom of text page.
  123. \textfloatsep 20pt plus 2pt minus 4pt    % Space between main text and floats
  124.                                          % at top or bottom of page.
  125. \intextsep 12pt plus 2pt minus 2pt       % Space between in-text figures and
  126.                                          % text.
  127. \@maxsep 20pt                            % The maximum of \floatsep,
  128.                                          % \textfloatsep and \intextsep (minus
  129.                                          % the stretch and shrink).
  130. %    TWO-COLUMN FLOATS IN TWO-COLUMN MODE:
  131. \dblfloatsep 12pt plus 2pt minus 2pt     % Same as \floatsep for double-column
  132.                                          % figures in two-column mode.
  133. \dbltextfloatsep 20pt plus 2pt minus 4pt % \textfloatsep for double-column
  134.                                          % floats.
  135. \@dblmaxsep 20pt                         % The maximum of \dblfloatsep and
  136.                                          % \dbltexfloatsep.
  137.  
  138. %  FOR FLOATS ON A SEPARATE FLOAT PAGE OR COLUMN:
  139. %    ONE-COLUMN MODE OR SINGLE-COLUMN FLOATS IN TWO-COLUMN MODE:
  140. \@fptop 0pt plus 1fil    % Stretch at top of float page/column. (Must be
  141.                          % 0pt plus ...)
  142. \@fpsep 8pt plus 2fil    % Space between floats on float page/column.
  143. \@fpbot 0pt plus 1fil    % Stretch at bottom of float page/column. (Must be
  144.                          % 0pt plus ... )
  145.  
  146. %   DOUBLE-COLUMN FLOATS IN TWO-COLUMN MODE.
  147. \@dblfptop 0pt plus 1fil % Stretch at top of float page. (Must be 0pt plus ...)
  148. \@dblfpsep 8pt plus 2fil % Space between floats on float page.
  149. \@dblfpbot 0pt plus 1fil % Stretch at bottom of float page. (Must be
  150.                          % 0pt plus ... )
  151. % MARGINAL NOTES:
  152. %
  153. \marginparpush 5pt       % Minimum vertical separation between two marginal
  154.                          % notes.
  155.  
  156.  
  157. %  ****************************************
  158. %  *           PARAGRAPHING               *
  159. %  ****************************************
  160. %
  161. \parskip 10pt plus 1pt              % Extra vertical space between paragraphs.
  162. \parindent 15pt                    % Width of paragraph indentation.
  163. \topsep 8pt plus 2pt minus 4pt     % Extra vertical space, in addition to
  164.                                    % \parskip, added above and below list and
  165.                                    % paragraphing environments.
  166. \partopsep 2pt plus 1pt minus 1pt  % Extra vertical space, in addition to
  167.                                    % \parskip and \topsep, added when user
  168.                                    % leaves blank line before environment.
  169. \itemsep 4pt plus 2pt minus 1pt    % Extra vertical space, in addition to
  170.                                    % \parskip, added between list items.
  171.  
  172. % The following page-breaking penalties are defined
  173.  
  174. \@lowpenalty   51      % Produced by \nopagebreak[1] or \nolinebreak[1]
  175. \@medpenalty  151      % Produced by \nopagebreak[2] or \nolinebreak[2]
  176. \@highpenalty 301      % Produced by \nopagebreak[3] or \nolinebreak[3]
  177.  
  178. \@beginparpenalty -\@lowpenalty    % Before a list or paragraph environment.
  179. \@endparpenalty   -\@lowpenalty    % After a list or paragraph environment.
  180. \@itempenalty     -\@lowpenalty    % Between list items.
  181.  
  182. % \clubpenalty         % 'Club line'  at bottom of page.
  183. % \widowpenalty        % 'Widow line' at top of page.
  184. % \displaywidowpenalty % Math display widow line.
  185. % \predisplaypenalty   % Breaking before a math display.
  186. % \postdisplaypenalty  % Breaking after a math display.
  187. % \interlinepenalty    % Breaking at a line within a paragraph.
  188. % \brokenpenalty       % Breaking after a hyphenated line.
  189.  
  190.  
  191. %    ****************************************
  192. %    *             SECTIONS                 *
  193. %    ****************************************
  194. %
  195.  
  196. % \secdef{UNSTARCMDS}{STARCMDS} :
  197. %    When defining a sectionioning command without using
  198. %    \@startsection, you can use \secdef as follows:
  199. %       \def\part { ... \secdef \CMDA \CMDB }
  200. %       \def\CMDA  [#1]#2{ ... }     % Command to define \part[...]{...}
  201. %       \def\CMDB  #1{ ... }         % Command to define \part*{...}
  202.  
  203. \def\part{\par               % New paragraph
  204.    \addvspace{4ex}           % Adds vertical space above title.
  205.    \@afterindentfalse        % Suppresses indent in first paragraph.  Change
  206.    \secdef\@part\@spart}     % to \@afterindenttrue to have indent.
  207.  
  208. \def\@part[#1]#2{\ifnum \c@secnumdepth >\m@ne    % IF secnumdepth > -1
  209.         \refstepcounter{part}                    %  THEN step part counter
  210.         \addcontentsline{toc}{part}{\thepart     %       add toc line
  211.         \hspace{1em}#1}\else                     %  ELSE add unnumbered line
  212.       \addcontentsline{toc}{part}{#1}\fi         % FI
  213.    { \parindent 0pt \raggedright
  214.     \ifnum \c@secnumdepth >\m@ne   % IF secnumdepth > -1
  215.       \Large \bf Part \thepart     %   THEN Print 'Part' and
  216.       \par \nobreak                %          number in \Large boldface.
  217.     \fi                            % FI
  218.     \huge \bf                      % Select \huge boldface.
  219.     #2\markboth{}{}\par }          % Print title and set heading marks null.
  220.     \nobreak                       % TeX penalty to prevent page break.
  221.     \vskip 3ex                     % Space between title and text.
  222.    \@afterheading                  % Routine called after part and
  223.     }                              %     section heading.
  224.  
  225. % Heading for \part* command
  226. \def\@spart#1{{\parindent 0pt \raggedright
  227.     \huge \bf
  228.     #1\par}                         % Title.
  229.     \nobreak                        % TeX penalty to prevent page break.
  230.     \vskip 3ex                      % Space between title and text.
  231.     \@afterheading                  % Routine called after part and
  232.   }                                 %     section heading.
  233.  
  234. % \@startsection {NAME}{LEVEL}{INDENT}{BEFORESKIP}{AFTERSKIP}{STYLE}
  235. %            optional * [ALTHEADING]{HEADING}
  236. %    Generic command to start a section.
  237. %    NAME       : e.g., 'subsection'
  238. %    LEVEL      : a number, denoting depth of section -- i.e., section=1,
  239. %                 subsection = 2, etc.  A section number will be printed if
  240. %                 and only if LEVEL < or = the value of the secnumdepth
  241. %                 counter.
  242. %    INDENT     : Indentation of heading from left margin
  243. %    BEFORESKIP : Absolute value = skip to leave above the heading.
  244. %                 If negative, then paragraph indent of text following
  245. %                 heading is suppressed.
  246. %    AFTERSKIP  : if positive, then skip to leave below heading,
  247. %                       else - skip to leave to right of run-in heading.
  248. %    STYLE      : commands to set style
  249. %  If '*' missing, then increments the counter.  If it is present, then
  250. %  there should be no [ALTHEADING] argument.  A sectioning command
  251. %  is normally defined to \@startsection + its first six arguments.
  252.  
  253. \def\section{\@startsection {section}{1}{\parindent}
  254.     {3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}{\sectionstyle}}
  255. \def\subsection{\@startsection{subsection}{2}{\parindent}
  256.     {3.25ex plus 1ex minus .2ex}{-1.5ex plus .2ex}{\subsectionstyle}}
  257. \def\subsubsection{\@startsection{subsubsection}{3}{\parindent}
  258.     {3.25ex plus 1ex minus .2ex}{-1.5ex plus -.2ex}{\subsubsectionstyle}}
  259. \def\paragraph{\@startsection {paragraph}{4}{\parindent}
  260.     {3.25ex plus 1ex minus .2ex}{-1em}{\paragraphstyle}}
  261. \def\subparagraph{\@startsection {subparagraph}{5}{\parindent}
  262.     {3.25ex plus 1ex minus .2ex}{-1em}{\subparagraphstyle}}
  263. \def\subsubparagraph{\@startsection {subsubparagraph}{6}{\parindent}
  264.     {3.25ex plus 1ex minus .2ex}{-1em}{\subsubparagraphstyle}}
  265. \def\subsubsubparagraph{\@startsection {subsubsubparagraph}{7}{\parindent}
  266.     {3.25ex plus 1ex minus .2ex}{-1em}{\subsubsubparagraphstyle}}
  267.  
  268. % The value of the counter secnumdepth gives the depth of the
  269. % highest-level sectioning command that is to produce section numbers.
  270. %
  271.  
  272. \setcounter{secnumdepth}{7}
  273.  
  274. % APPENDIX
  275. %
  276. % The \appendix command must do the following:
  277. %    -- reset the section counter to zero and 
  278. %    -- reset the subsection counter to zero
  279. %    -- redefine the \section command to produce the proper format appendix 
  280.  
  281. \def\appendix{\par
  282.   \clearpage
  283.   \renewcommand{\thepage}{\Roman{appnumber}-\arabic{page}}
  284.   \setcounter{appnumber}{0}
  285.   \ifnum \value{section} > 9 \setcounter{increment}{99}
  286.     \else \setcounter{increment}{9} \fi
  287.   \setcounter{section}{0}
  288.   \setcounter{subsection}{0}
  289.   \makeatletter
  290.     \def\section{\clearpage \addtocounter{section}{\value{increment}}
  291.       \addtocounter{appnumber}{1} \setcounter{page}{1}
  292.       \addtocontents{toc}{\noindent\hspace{7em}APPENDIX~\Roman{appnumber}}
  293.       \setcounter{figure}{0}
  294.       \setcounter{table}{0}
  295.        \begin{center} 
  296.      \large\bf 
  297.      APPENDIX~\Roman{appnumber}
  298.        \end{center} 
  299.        \par 
  300.        \@startsection {section}{1}{\parindent}{3.5ex plus 1ex minus
  301.        .2ex}{2.3ex plus .2ex}{\sectionstyle}}
  302.   \makeatother
  303.   \def\thefigure{\Roman{appnumber}-\arabic{figure}}
  304.   \def\thetable{\Roman{appnumber}-\Roman{table}}
  305. }
  306.  
  307. %    ****************************************
  308. %    *                LISTS                 *
  309. %    ****************************************
  310. %
  311.  
  312. % The following commands are used to set the default values for the list
  313. % environment's parameters. See the LaTeX manual for an explanation of
  314. % the meanings of the parameters.  Defaults for the list environment are
  315. % set as follows.  First, \rightmargin, \listparindent and \itemindent
  316. % are set to 0pt.  Then, for a Kth level list, the command \@listK is
  317. % called, where 'K' denotes 'i', 'ii', ... , 'vi'.  (I.e., \@listiii is
  318. % called for a third-level list.)  By convention, \@listK should set
  319. % \leftmargin to \leftmarginK.
  320. %
  321. % For efficiency, level-one list's values are defined at top level, and
  322. % \@listi is defined to set only \leftmargin
  323.  
  324. \leftmargini 4.5em     % 25pt
  325. \leftmarginii 2.2em    % 22pt     % > \labelsep + width of '(m)'
  326. \leftmarginiii 1.87em  % 18.7pt  % > \labelsep + width of 'vii.'
  327. \leftmarginiv 1.7em    % 17pt     % > \labelsep + width of 'M.'
  328. \leftmarginv 1em       % 10pt
  329. \leftmarginvi 1em      % 10pt
  330.  
  331. \leftmargin\leftmargini
  332. \labelwidth\leftmargini\advance\labelwidth-\labelsep
  333. \labelsep 5pt
  334. \parsep 4pt plus 2pt minus 1pt
  335.  
  336. \def\@listi{\leftmargin\leftmargini}
  337.  
  338. \def\@listii{\leftmargin\leftmarginii
  339.    \labelwidth\leftmarginii\advance\labelwidth-\labelsep
  340.    \topsep 4pt plus 2pt minus 1pt
  341.    \parsep 2pt plus 1pt minus 1pt
  342.    \itemsep \parsep}
  343.  
  344. \def\@listiii{\leftmargin\leftmarginiii
  345.     \labelwidth\leftmarginiii\advance\labelwidth-\labelsep
  346.     \topsep 2pt plus 1pt minus 1pt
  347.     \parsep \z@ \partopsep 1pt plus 0pt minus 1pt
  348.     \itemsep \topsep}
  349.  
  350. \def\@listiv{\leftmargin\leftmarginiv
  351.      \labelwidth\leftmarginiv\advance\labelwidth-\labelsep}
  352.  
  353. \def\@listv{\leftmargin\leftmarginv
  354.      \labelwidth\leftmarginv\advance\labelwidth-\labelsep}
  355.  
  356. \def\@listvi{\leftmargin\leftmarginvi
  357.      \labelwidth\leftmarginvi\advance\labelwidth-\labelsep}
  358. %     DEC/CMS REPLACEMENT HISTORY, Element BF10.STY
  359. %     *7    25-FEB-1986 14:12:05 MCPHERSON "Change \footskip to move page number down a little"
  360. %     *6    24-FEB-1986 13:22:24 MCPHERSON "Remove revision dates from the file"
  361. %     *5    21-FEB-1986 18:12:59 MCPHERSON "Corrected the increment counter definition"
  362. %     *4    21-FEB-1986 18:09:56 MCPHERSON "Correct appnumber counter definition"
  363. %     *3    21-FEB-1986 17:36:36 MCPHERSON "Moved subsection,... text to end of title, fixed toc entries for appendix"
  364. %     *2    17-FEB-1986 14:27:35 MCPHERSON "Appendices have figures and tables numbered from 1"
  365. %     *1     7-FEB-1986 10:12:15 MCPHERSON "Initial bookform style"
  366. %     DEC/CMS REPLACEMENT HISTORY, Element BF10.STY
  367.